import NftEggsStore from "../contracts/NftEggsStore.cdc"

// 这个脚本返回市场在售的所有NFT

pub fun main(account: Address): [UInt64] {
    let storefrontRef = getAccount(account)
        .getCapability<&NftEggsStore.Storefront{NftEggsStore.StorefrontPublic}>(
            NftEggsStore.StorefrontPublicPath
        )
        .borrow()
        ?? panic("Could not borrow public storefront from address")
    
    return storefrontRef.getListingIDs()
}
